Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: detect Python methods as properties correctly #1111

Merged
merged 3 commits into from
Aug 1, 2023

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt changed the title Fix python sorting fix: detect Python methods as properties correctly Jul 31, 2023
@github-actions
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1111.centralus.azurestaticapps.net

return { key: 'd', title: 'Deprecated' };
if (member.kind === 'event')
return { key: 'c', title: 'Events' };
if (member.kind === 'property' || (member.kind === 'method' && !member.async && member.argsArray.length === 0))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd instead introduce renderSyncNoArgsMethodAsProperty(): boolean method and put this logic into generator.js.

* srcDir: string,
* outDir: string,
* formatter: GeneratorFormatter,
* renderSyncNoArgsMethodAsProperty?: boolean,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think this is more of a GeneratorFormatter property rather than generator's parameter, but this way also works.

@github-actions
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1111.centralus.azurestaticapps.net

1 similar comment
@github-actions
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-forest-0a29f6210-1111.centralus.azurestaticapps.net

@mxschmitt mxschmitt merged commit 6b7ffd7 into main Aug 1, 2023
@mxschmitt mxschmitt deleted the fix-python-sorting branch August 1, 2023 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Some properties not documented as such
2 participants